package com.ofek.eventos.db.datatypes;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.ofek.eventos.db.datatypes.helptypes.TableFieldInfo.Converter;

public class DateConverter implements Converter{

	private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy.MM.dd 'at' HH:mm:ss.SSS");

	@Override
	public String convert(final Object o) {
		final Long l = (Long)(o);
		return SIMPLE_DATE_FORMAT.format(new Date(l));
	}

}
